package cn.stylefeng.guns.sys.modular.system.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.sys.modular.system.entity.BtyBxd;
import cn.stylefeng.guns.sys.modular.system.entity.BtyEkb;
import cn.stylefeng.guns.sys.modular.system.model.params.BtyEkbParam;
import cn.stylefeng.guns.sys.modular.system.model.result.BtyEkbResult;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author liuy
 * @since 2021-08-09
 */
public interface BtyEkbService extends IService<BtyEkb> {

    /**
     * 新增
     *
     * @author liuy
     * @Date 2021-08-09
     */
    void add(BtyEkbParam param);

    /**
     * 删除
     *
     * @author liuy
     * @Date 2021-08-09
     */
    void delete(BtyEkbParam param);

    /**
     * 更新
     *
     * @author liuy
     * @Date 2021-08-09
     */
    void update(BtyEkbParam param);

    void  updateByCode(BtyEkbParam param);

    /**
     * 设置供货商openid
     */
    int setOpenid(String openid,String xm,String yhk);

    /**
     * 获取报销单已报销金额
     */
    List<BtyEkbResult> sumZcje(String openid, String beginTime, String endTime);
    /**
     * 获取报销单未报销金额
     */
    List<BtyEkbResult> sumWbxje(String openid,String beginTime,String endTime);
    /**
     * 获取报销单总金额
     */
    List<BtyEkbResult> sumJe(String openid,String beginTime,String endTime);

    /**
     * 查询单条数据，Specification模式
     *
     * @author liuy
     * @Date 2021-08-09
     */
    BtyEkbResult findBySpec(BtyEkbParam param);

    /**
     * 查询列表，Specification模式
     *
     * @author liuy
     * @Date 2021-08-09
     */
    List<BtyEkbResult> findListBySpec(BtyEkbParam param);

    /**
     * 查询分页数据，Specification模式
     *
     * @author liuy
     * @Date 2021-08-09
     */
     LayuiPageInfo findPageBySpec(BtyEkbParam param);

     LayuiPageInfo findPageByZxList(BtyEkbParam param);

    boolean insertEkb(List<BtyEkb> sub);

}
